<html>
 <head>
	<title>[var.TITLE]</title>
	<link href="[var.ROOT_CSS_DIR]/main.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
	<link href="[var.ROOT_CSS_DIR]/facet/style.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">	
	<script type="text/javascript" src="[var.ROOT_DIR]js/doiMenuDOM.js"></script>
	<script type="text/javascript" src="[var.ROOT_DIR]js/functions.js"></script>
	<script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.php"></script>
	<script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.cfg"></script>	
	<script type="text/javascript" src="[var.ROOT_DIR]js/jsmasks.js"></script>
 </head>
 <body bgcolor="FFFFFF" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
	<table border="0" cellspacing="0" cellpadding="0" width="100%" align="[var.POSITION]">
		<tr>
			<td>[tbs_include.onshow;file=[var.HTMLHeader];getob;]</td>
		</tr>

		<tr>
			<td>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
				<tr>
					<td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
				</tr>
				<tr>
					<td background="[var.ROOT_IMG_DIR]/back-menu.gif">
					<table border="0" cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<td>
      			  				<script language="JavaScript" type="text/JavaScript">menu.Build();</script>
						  	</td>
						    <td class="head-login">Login as [var.USERPROFILE_NAME]</td>
						</tr>
					</table>
					</td>
				</tr>

				<tr>
					<td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
				</tr>
			</table>
			</td>
		</tr>

		<tr height="100%">
			<td>
			<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
				<tr valign="top">
					<td width="100%">
						<table border="0" cellspacing="0" cellpadding="0" width="100%">			
							<tr>
								<td class="head-path"></td>
								<td class="corner-date">[var.CORNER_DATE]</td>
							</tr>
						</table>
						<table border="0" cellspacing="0" cellpadding="5" width="100%">
							<tr>
								<td class="FacetHeaderContent" align="left">.:[var.SubHeaderTitle]:. </td>
							</tr>
						</table>
						<table border="0" cellspacing="0" cellpadding="5" width="100%">
							<tr>
								<td class="content2">
									<table border="0" cellspacing="0" cellpadding="0">
									<form name="[var.HTMLFormName]">
										<tr>
											<td class="fieldCaption" align="right">Backup Type</td>
											<td class="fieldCaption">:</td>
											<td>
												<select name="backuptype" class="input" onchange="SwitchMode(this.value)">
												<option value="BD">Transaction Database, Between Date</option>
												<option value="MD">Transaction Database, Monthly / Daily</option>
												<option value="FD">Full All Database</option>
												<option value="FT">Full Transaction Database</option>
												<option>[tbs_check; if [var.backuptype] != '';then [var.backuptype];else 'BD';selected;noerr]</option>
												</select>
											</td>
										</tr>
										<tr id="backupYear">
											<td class="fieldCaption" align="right">Year</td>
											<td class="fieldCaption">:</td>
											<td>
											<select name="periodYear" class="input">
    											<option value="">-</option>
    											<option value="[yearformblk.year]">[yearformblk.year;block=option]</option>
											</select>
											</td>
										</tr>
										<tr id="backupMonth">
											<td class="fieldCaption" align="right">Month</td>
											<td class="fieldCaption">:</td>
											<td>
											<select name="periodMonth" class="input">
    											<option value="">-</option>
    											<option value="[monthformblk.id]">[monthformblk.month;block=option]</option>
											</select>
											</td>
										</tr>
										<tr id="backupDay">
											<td class="fieldCaption" align="right">Day</td>
											<td class="fieldCaption">:</td>
											<td>
											<input type="text" name="periodDay" size="2" maxlength="50" class="input" value="[var.periodDay]">
											</td>
										</tr>
										<tr id="backupfromDate">
											<td class="fieldCaption" align="right">From Date</td>
											<td class="fieldCaption">:</td>
											<td>
											<input type="text" name="fromDate" size="10" maxlength="50" class="input" value="[var.fromDate]">
											<a href="javascript:void(0)" onclick="gfPop.fPopCalendar(document.[var.HTMLFormName].fromDate);return false;" hidefocus>
											<img name="popcal" align="absMiddle" src="[var.ROOT_DIR]js/Calendar/pop/calbtn.gif" width="34" height="22" border="0" alt=""></a>
											</td>
										</tr>									
										<tr id="backuptoDate">
											<td class="fieldCaption" align="right">To Date</td>
											<td class="fieldCaption">:</td>
											<td>
											<input type="text" name="toDate" size="10" maxlength="50" class="input" value="[var.toDate]">
											<a href="javascript:void(0)" onclick="gfPop.fPopCalendar(document.[var.HTMLFormName].toDate);return false;" hidefocus>
											<img name="popcal" align="absMiddle" src="[var.ROOT_DIR]js/Calendar/pop/calbtn.gif" width="34" height="22" border="0" alt=""></a>
											</td>
										</tr>
                                            <script>
                                            oDateMask   = new Mask('dd/mm/yyyy','date')
                                            oDateMask.attach(document.[var.HTMLFormName].fromDate)
                                            oDateMask.attach(document.[var.HTMLFormName].toDate)
                                            </script>
										<tr>
											<td class="menuHeader"></td>
											<td class="menuHeader"></td>
											<td align="right">
											<input type="submit" name="Action" value="Backup" class="button" >
											</td>
										</tr>										
									</form>
									</table>								
								</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
						</table>

						<table border="0" cellspacing="0" cellpadding="0" width="100%">
						    <tr>
						      <td>
						 <!-- GRID SECTION -->
									<table border="0" width="100%" cellpadding="3" cellspacing="1" class="FacetFormTABLE" align="left">
									<form method=post name="[var.HTMLGridList]" >
									  <tr>
									  	<td nowrap class="FacetColumnTD" align="center" width="25">No.</td>
									    <td nowrap class="FacetColumnTD" align="center" width="150">Creation Time</td>
									    <td nowrap class="FacetColumnTD" align="center">File Name</td>
									    <td nowrap class="FacetColumnTD" align="center">Filesize</td>
									    <td nowrap class="FacetColumnTD" align="center">Action</td>
									  </tr>

									  <tr>
									    <td nowrap class="FacetDataTD" align="right">[blg.#].</td>
									    <td class="FacetDataTD">[blg.filetime]</td>
									    <td class="FacetDataTD"><a href="[var.BACKUP_DIR]/[blg.filename]">[blg.filename;block=tr]</a></td>
									    <td class="FacetDataTD" align="right">[blg.filesize;frm='0,000.0'] kb</td>
									    <td class="FacetDataTD" align="center"><a href="[sys.script_name]?Action=Restore&FileName=[blg.filename]">Restore</a> / <a href="[sys.script_name]?Action=Delete&FileName=[blg.filename]">Delete</a></td>
									  </tr>

									  <tr>									  
									    <td colspan="5" class="FacetDataTD">[blg;block=tr;nodata]No records</td>
									  </tr>

									  <tr>
									    <td colspan="5" nowrap class="FacetColumnTD">[tbs_check.1;block=tr;if [var.RecCnt]!=0]
										<table border="0" align="left" cellpadding="0" cellspacing="0" >
										  <tr align="center">
										    <td width="16" class="FacetColumnTD"><a href="[sys.script_name]?PageNum=[nv.first;endpoint;friend2=a]">|&lt;</a></td>
										    <td width="16" class="FacetColumnTD"><a href="[sys.script_name]?PageNum=[nv.prev;endpoint;friend2=a]">&lt;</a></td>
										    <td width="16" class="FacetColumnTD"><a href="[sys.script_name]?PageNum=[nv.page;block=td]">[nv.page]</a></td>
										    <td width="16" bgcolor="#B7B3B7"><strong>[nv.page;block=td;currpage]</strong></td>
										    <td width="16" class="FacetColumnTD"><a href="[sys.script_name]?PageNum=[nv.next;endpoint;friend2=a]">&gt;</a></td>
										    <td width="16" class="FacetColumnTD"><a href="[sys.script_name]?PageNum=[nv.last;endpoint;friend2=a]">&gt;|</a></td>
										  </tr>
										</table>
									    </td>
									 </tr>
									  </form>
									</table>
						<!-- GRID SECTION -->						

						       </td>						      
						 	</tr>
						 	<tr>
						 	  <td>

						 	  &nbsp;
						 	  </td>
						 	</tr>
							</table>
					</td>
				</tr>
			</table>

			</td>
		</tr>
 	</table>
 </body>
</html>
<iframe width="174" height="189" name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="[var.ROOT_DIR]js/Calendar/pop/ipopeng.htm" scrolling="no" frameborder="0" style="LEFT: -500px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; Z-INDEX: 999"></iframe> 
<script>
SwitchMode(document.[var.HTMLFormName].backuptype.value);

function CheckRequire(backuptype) {
	if (backuptype=="BD") {
		frmDate = document.[var.HTMLFormName].fromDate.value;
		toDate  = document.[var.HTMLFormName].toDate.value;
		if (frmDate.length && toDate.length) return true;
		else return false;
	}else if (backuptype=="MD") {
		periodYear	= document.[var.HTMLFormName].periodYear.value;
		if (periodYear.length) return true;
		else return false;
	}
}

function SwitchMode(val) {
    if (val=="BD") {
      document.getElementById("backupYear").style.display = "none";
      document.getElementById("backupMonth").style.display = "none";
      document.getElementById("backupDay").style.display = "none";
      document.getElementById("backupfromDate").style.display = "";
      document.getElementById("backuptoDate").style.display = "";
    }else if (val=="MD") {
      document.getElementById("backupYear").style.display = "";
      document.getElementById("backupMonth").style.display = "";
      document.getElementById("backupDay").style.display = "";
      document.getElementById("backupfromDate").style.display = "none";
      document.getElementById("backuptoDate").style.display = "none";

    }else if(val=="FD") {
      document.getElementById("backupYear").style.display = "none";
      document.getElementById("backupMonth").style.display = "none";
      document.getElementById("backupDay").style.display = "none";
      document.getElementById("backupfromDate").style.display = "none";
      document.getElementById("backuptoDate").style.display = "none";
    }else if(val=="FT") {
      document.getElementById("backupYear").style.display = "none";
      document.getElementById("backupMonth").style.display = "none";
      document.getElementById("backupDay").style.display = "none";
      document.getElementById("backupfromDate").style.display = "none";
      document.getElementById("backuptoDate").style.display = "none";
	}
}
</script>
